package com.xhsj.user.sms.purchase.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xhsj.user.sms.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * <p>
 * 采购订单-商品表
 * </p>
 *
 * @author suxiaolin
 * @since 2020-04-23
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tb_purchase_order_goods")
public class TbPurchaseOrderGoods extends BaseEntity<TbPurchaseOrderGoods> {

    private static final long serialVersionUID = 1L;

    /**
     * 采购申请id
     */
    @TableField("purchase_task_id")
    private String purchaseTaskId;

    /**
     * 采购订单主表id
     */
    @TableField("purchase_order_id")
    private String purchaseOrderId;

    /**
     * 品号
     */
    @TableField("item_no")
    private String itemNo;

    /**
     * 品名
     */
    @TableField("item_name")
    private String itemName;

    /**
     * 规格
     */
    @TableField("specification")
    private String specification;

    /**
     * 数量
     */
    @NotNull(message = "数量不能为空")
    @TableField("apply_number")
    private Integer applyNumber;

    /**
     * 单位
     */
    @NotBlank(message = "单位不能为空")
    @TableField("unit")
    private String unit;

    /**
     * 单价
     */
    @NotNull(message = "单价不能为空")
    @TableField("price")
    private BigDecimal price;

    /**
     * 总金额
     */
    @NotNull(message = "总金额不能为空")
    @TableField("total_money")
    private BigDecimal totalMoney;

    /**
     * 退货数量
     */
    @TableField("return_number")
    private Integer returnNumber;

    /**
     * 入库状态 0 未完成 1 已完成
     */
    @TableField("storage_status")
    private Integer storageStatus = 0;


}
